package com.zhongwang.business.module.menu.controller;

import com.zhongwang.business.base.BaseController;
import com.zhongwang.business.common.JsonResult;

import com.zhongwang.business.module.menu.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 徐一贺
 * @className MenuController
 * @description 菜单控制层
 * @date 2020/11/19 16:45
 * @versron ver 1.0
 */
@Controller
@RequestMapping("/menu")
public class MenuController extends BaseController {

    @Autowired
    private MenuService service;

    /**  getItemCountAccounting 获取核算菜单项数据数量
     * @param
     * @return com.zhongwang.business.common.JsonResult
     * @exception
     * @author 徐一贺
     * @date 2020/11/19 16:58
     */
    @ResponseBody
    @PostMapping("/getItemCount/accounting")
    public JsonResult getItemCountAccounting(){
        return success().setData(service.getItemCountAccounting());
    }

}
